//
//  TChatController.h
//  UIKit
//
//  Created by kennethmiao on 2018/9/18.
//  Copyright © 2018年 kennethmiao. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "TInputController.h"
#import "TMessageController.h"
#import "TConversationCell.h"
#import "ChatTopToolBarView.h"
#import "ChatBaseInfoModel.h"

@class TChatController;

@protocol TChatControllerDelegate <NSObject>
@optional
- (void)chatControllerDidClickRightBarButton:(TChatController *)controller;
- (void)chatControllerDidClickRightBarBtnYuemianshi:(TChatController *)controller;
- (void)chatControllerDidClickRightBarBtnShezhi:(TChatController *)controller;

- (void)chatController:(TChatController *)chatController didSelectMoreAtIndex:(NSInteger)index;
- (void)chatController:(TChatController *)chatController didSelectMessages:(NSMutableArray *)msgs atIndex:(NSInteger)index;
- (void)chatController:(TChatController *)chatController didSelectChatItem:(ChatTopToolBarViewType)type;
@end

@interface TChatController : BaseViewController

@property (nonatomic, assign) BOOL isNotice; // 是不是自定义消息中的官方通知

@property (nonatomic, assign) BOOL isSessionPush; // 是不是从会话列表进去的？（会话列表进去的不需要重新拉去数据，否则需要重新拉数据，防止腾讯数据重发） YES：是 NO：不是

@property (nonatomic, copy) ChatBaseInfoModel *infoModel;

@property (nonatomic, strong) TConversationCellData *conversation;
@property (nonatomic, strong) TMessageController *messageController;
@property (nonatomic, strong) TInputController *inputController;
@property (nonatomic, weak) id<TChatControllerDelegate> delegate;

@property (nonatomic, strong) ChatTopToolBarView *CTTBView;
@property (nonatomic, copy) NSString *chatAvatar; // 对方头像

- (void)sendImageMessage:(UIImage *)image;
- (void)sendVideoMessage:(NSURL *)url;
- (void)sendFileMessage:(NSURL *)url;
- (void)sendWeizhi:(NSDictionary *)dic;

@end
